Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the display of the
eval $(opam env)
messages. In particular:eval `opam config env`
message toeval $(opam config env)
. At this point, it was necessary to add a special case forcsh
which doesn't support that syntax.OpamEnv.eval_string
only ever guessed the shell from$SHELL
even when--shell
had been passed to opam.opam init
always displayedeval $(opam env)
regardless of the shell, as did--help
screens.This PR:
`csh
which uses backticks.OpamEnv.eval_string
to have ashell
parameter. This is quite an invasive change - in particular, it means thatswitch
,install
,pin
,remove
andreinstall
commands now have a--shell
parameter. I was quite haphazard about where~shell
got put... if you're happy with the idea of this change, this should be rationalised (i.e. should the argument always be named and where should it go in argument listed).opam init
now displays the correct command for the given shell.--help
screens for theswitch
,config
andenv
commands now display the command based on$SHELL
(i.e.OpamStd.Sys.guess_shell_compat
). It's possible to peek the--shell
argument here, but even I think that havingSHELL=bash opam config --shell=fish --help
work correctly is more effort than is necessary 😉